<ion-view view-title="参加活动" class="joinactivity ">
	<ion-nav-bar ng-class="baseclass">
		<ion-nav-back-button></ion-nav-back-button>
	</ion-nav-bar>

	<ion-content scroll="false" class="bg">
		<div class="row top">
			<div class="col tabtop" on-tap="activeSlide(0)" ng-class="selectIndex==0?'top-activated tabtopselect':''">
				进行中
			</div>
			<div class="col tabtop" on-tap="activeSlide(1)" ng-class="selectIndex==1?'top-activated tabtopselect':''">
				已结束
			</div>
		</div>

		<ion-slide-box delegate-handle="tab-handle" on-slide-changed="slideChanged(index)" active-slide="tabIndex" show-pager="false" on-touch="onTouch()" on-release="onRelease()">
			<!--进行中-->			
			<ion-slide>				
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->		
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<div class="item nolist text-center" ng-if="activitys.length==0||activitys==null">
						<img src="./img/guilin/promo/no-activity.icon@2x.png" />
						<p class="textone">还没有可参与的活动</p>
						<p class="texttwo">去看看别的吧！</p>
					</div>
					<div class="margin-bottom-10 bg" ng-repeat="activity in activitys">
						<img class="overimg" src="./img/guilin/promo/over.icon@2x.png" ng-if="activity.type==2" />
						<div class="item padding-0 activityframe">
							<div class="item item-input padding-0 activittitle">
								<span class=" activityname">{{activity.act_type}}</span>
								<p class="activitytext">{{activity.act_name}}</p>
							</div>
							<div class="item item-input padding-0 activitshop" >
								<img class="shopimg" src="./img/guilin/common/icon_shop@2x.png" />
								<span class="shopname" on-tap="onshow_first(activity.store_id)">{{activity.store_name}}</span>
								<img class="rightimg" src="./img/guilin/common/icon_right@2x.png" on-tap="onshow_first(activity.store_id)"/>
							</div>
							<div class="item item-input activitshop" style="padding: 0px;">
								<img class="shopimg" src="./img/guilin/promo/time.icon@2x.png" />
								<span class="shopname">{{activity.formate_time}}</span>
							</div>
						</div>
						<div class="item padding-0 btnsframe">
							<div class="btns" ng-repeat="btn in activity.buttons" on-tap="clickbtn(btn.error,activity.act_type,activity.act_id,activity.as_id)" style="color:{{btn.color}};border-color:{{btn.color}} ;">{{btn.name}}</div>
						</div>
					</div>
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

			<!--已结束-->
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<div class="item nolist text-center" ng-if="activityslist.length==0||activityslist==null">
						<img src="./img/guilin/promo/no-activity.icon@2x.png" />
						<p class="textone">还没有可参与的活动</p>
						<p class="texttwo">去看看别的吧！</p>
					</div>
					<div class="margin-bottom-10 bg" ng-repeat="activity in activityslist">
						<img class="overimg" src="./img/guilin/promo/over.icon@2x.png" />
						<div class="item padding-0 activityframe">
							<div class="item item-input padding-0 activittitle">
								<span class=" activityname">{{activity.act_type}}</span>
								<p class="activitytext">{{activity.act_name}}</p>
							</div>
							<div class="item item-input padding-0 activitshop" on-tap="onshow_first(activity.store_id)">
								<img class="shopimg" src="./img/guilin/common/icon_shop@2x.png" />
								<span class="shopname">{{activity.store_name}}</span>
								<img class="rightimg" src="./img/guilin/common/icon_right@2x.png" />
							</div>
							<div class="item item-input activitshop" style="padding: 0px;height: 20px;">
							<!--	<img class="shopimg" src="./img/guilin/promo/time.icon@2x.png" />
								<span class="shopname">{{activity.end_time*1000| date:'yyyy-MM-dd HH:mm:ss'}}</span>-->
							</div>
						</div>
						<div class="item padding-0 btnsframe">
							<div class="btns" ng-repeat="btn in activity.buttons" on-tap="clickbtn(btn.error,activity.act_type)" style="color:{{btn.color}};border-color:{{btn.color}} ;">{{btn.name}}</div>
						</div>
					</div>
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>

		</ion-slide-box>
	</ion-content>
</ion-view>